import {request} from './ljxdata.js'
export function login(username, password, code, uuid) {
  const data = {username, password, code, uuid}
  return request({
    url: 'http://localhost:8080/login',
    headers: {isToken: false},
    method: 'post',
    data: data,
	headers: { 'Content-Type': 'application/json;charset=UTF-8' },
  })
}
export function register(data) {// 注册方法
  return request({
    url: '/register',
    headers: {isToken: false},
    method: 'post',
    data: data
  })
}
export function getInfo() {// 获取用户详细信息
  return request({
    url: '/getInfo',
    method: 'get'
  })
}
export function logout() {// 退出方法
  return request({
    url: '/logout',
    method: 'post'
  })
}
export function getCodeImg() {// 获取验证码
  return request({
    url: 'http://localhost:8080/captchaImage',
    headers: {isToken: false},
    method: 'get',
    timeout: 20000,
	headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
  })
}